#pragma once

#include "net_def.h"
#include "net_socket.h"

class TcpSocket : public NetSocket
{
public:
	TcpSocket(boost::asio::io_service &io_service);
	~TcpSocket(void);

	inline tcp::socket& socket() { return m_socket; }

public:
	bool Run();

	bool Send(const char *buffer, size_t size);

protected:
	void OnRecv(const char *buffer, size_t size);

private:
	tcp::socket m_socket;
};
